package com.nwpu.coursesupport.service;

import com.nwpu.coursesupport.entity.bean.Response;
import com.nwpu.coursesupport.entity.bean.Setting;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

public abstract class AbstractService {

    protected static Logger logger = LoggerFactory.getLogger(AbstractService.class);

    @Autowired
	protected Setting setting;

	protected Session getSession() {
		Subject subject = SecurityUtils.getSubject();
		Session session = subject.getSession(true);
		return session;
	}


}
